
<template>
  <svg
    class="svg-icon"
    aria-hidden="true"
    v-on="$listeners"
    :style="{'width':width+'px','height':height+'px','color':color,'stroke':color}"
  >
    <use :xlink:href="iconName" />
  </svg>
</template>
 
<script>
export default {
  name: "iconSvg",
  props: {
    iconClass: {
      type: String,
      required: true
    },
    className: {
      type: String,
      default: ""
    },
    width: {
      type: Number,
      default: null
    },
    height: {
      type: Number,
      default: null
    },
    color: {
      type: String,
      default: ()=>'#272D37'
    }
  },
  computed: {
    iconName() {
      return `#icon-${this.iconClass}`;
    },
  }
};
</script>
 
<style>
.svg-icon {
  width: 100%;
  height: 100%;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>